/**
 *定义员工页面的api
 */

import request from '@/utils/request'

/**
* @description:获取员工数据列表
* @param {Object} 查询的页数以及数量
* @return: promise
*/

export const queryEmployessList = data => request.get('/sys/user', { params: data })

/**
* @description: 删除当前员工
* @param {String}
* @return:promise
*/

export const deleteEmployeById = id => request.delete('/sys/user/' + id)
/**
* @description: 添加一个员工
* @param {Object}
* @return:promise
*/

export const addEmploye = data => request.post('/sys/user', data)

/**
* @description: 导入Excel文件
* @param {Object}
* @return:promise
*/

export const importEmployee = data => request.post('/sys/user/batch', data)

/**
* @description: 根据 id 获取员工基本信息
* @param {String}
* @return: promise
*/

export const queryBaseInfoById = id => request.get('/sys/user/' + id)

/**
* @description: 修改员工的信息
* @param {Object}
* @return: promise
*/

export const updateBaseInfoById = data => request.put('/sys/user/' + data.id, data)
